//校验用户账号
const loginCodeReg = /^(\d|[a-zA-Z_]){1,20}$/;

//校验用户名
const userNameReg = /^([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z_]){1,20}$/;

//校验网址
const websiteUrlReg =
  /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;

//校验数字
const verificationNumReg = /(^[1-9]([0-9]*)$|^[0-9]$)/;

//校验密码
const passwordReg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/;

//验证邮箱的正则
const emailReg = /^([0-9A-Za-z\-_\.]+)@([0-9a-z]+\.[a-z]{2,3}(\.[a-z]{2})?)$/;

//验证手机号的正则
const mobileReg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;

export default {
  loginCodeReg,
  userNameReg,
  websiteUrlReg,
  verificationNumReg,
  passwordReg,
  emailReg,
  mobileReg,
};
